package com.yiji.fintech.musfinance.base.enums;

import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

public enum SettlementTypeEnum {

	WEIXINDATE("01", "微信结算日"),

	WEIXINZQ("Z", "微信转清"),

	WEIXINTX("N", "微信提现"),

	WEIXINQS("E", "钱包清算"),

	ALIPAYDATE("11", "支付宝结算日"),

	ALIPAYQS("E", "支付宝钱包清算"),

	ALIPAYZQ("Z", "支付宝转清");

	/**
	 * 枚举值
	 */
	private final String code;

	/**
	 * 枚举描述
	 */
	private final String message;

	/**
	 * 构造一个<code>InstAccountTypeEnum</code>枚举对象
	 *
	 * @param code
	 * @param message
	 */
	private SettlementTypeEnum(String code, String message) {
		this.code = code;
		this.message = message;
	}

	/**
	 * @return Returns the code.
	 */
	public String getCode() {
		return code;
	}

	/**
	 * @return Returns the message.
	 */
	public String getMessage() {
		return message;
	}

	/**
	 * @return Returns the code.
	 */
	public String code() {
		return code;
	}

	/**
	 * @return Returns the message.
	 */
	public String message() {
		return message;
	}

	public static Map<String, String> mapping() {
		Map<String, String> map = new LinkedHashMap<String, String>();
		for (SettlementTypeEnum type : values()) {
			map.put(type.getCode(), type.getMessage());
		}
		return map;
	}
	public static List<SettlementTypeEnum> getAll() {
		List<SettlementTypeEnum> list = new ArrayList<>();
		for (SettlementTypeEnum status : values()) {
			list.add(status);
		}
		return list;
	}
}
